home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / DJDEV203.ZIP / include / pc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-24  |  2.5 KB  |  77 lines

  1. /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
  2. /* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
  3. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  4. #ifndef __dj_include_pc_h_
  5. #define __dj_include_pc_h_
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  12.  
  13. #ifndef __STRICT_ANSI__
  14.  
  15. #ifndef _POSIX_SOURCE
  16.  
  17. unsigned char    inportb  (unsigned short _port);
  18. unsigned short    inportw  (unsigned short _port);
  19. unsigned long    inportl  (unsigned short _port);
  20. void        inportsb (unsigned short _port, unsigned char  *_buf, unsigned _len);
  21. void        inportsw (unsigned short _port, unsigned short *_buf, unsigned _len);
  22. void        inportsl (unsigned short _port, unsigned long  *_buf, unsigned _len);
  23. void        outportb (unsigned short _port, unsigned char  _data);
  24. void        outportw (unsigned short _port, unsigned short _data);
  25. void        outportl (unsigned short _port, unsigned long  _data);
  26. void        outportsb(unsigned short _port, const unsigned char  *_buf, unsigned _len);
  27. void        outportsw(unsigned short _port, const unsigned short *_buf, unsigned _len);
  28. void        outportsl(unsigned short _port, const unsigned long  *_buf, unsigned _len);
  29.  
  30. unsigned char    inp(unsigned short _port);
  31. unsigned short    inpw(unsigned short _port);
  32. void        outp(unsigned short _port, unsigned char _data);
  33. void        outpw(unsigned short _port, unsigned short _data);
  34. #ifndef kbhit
  35. int        kbhit(void);
  36. #endif
  37. int        getkey(void);    /* ALT's have 0x100 set */
  38. int        getxkey(void);    /* ALT's have 0x100 set, 0xe0 sets 0x200 */
  39.  
  40. void        sound(int _frequency);
  41. #define        nosound() sound(0)
  42.  
  43. extern unsigned char ScreenAttrib;
  44.  
  45. #define ScreenPrimary _go32_info_block.linear_address_of_primary_screen
  46. #define ScreenSecondary _go32_info_block.linear_address_of_secondary_screen
  47.  
  48. int    ScreenMode(void);
  49. int    ScreenRows(void);
  50. int    ScreenCols(void);
  51. void    ScreenPutChar(int _ch, int _attr, int _x, int _y);
  52. void    ScreenGetChar(int *_ch, int *_attr, int _x, int _y);
  53. void    ScreenPutString(const char *_ch, int _attr, int _x, int _y);
  54. void    ScreenSetCursor(int  _row, int  _col);
  55. void    ScreenGetCursor(int *_row, int *_col);
  56. void    ScreenClear(void);
  57. void    ScreenUpdate(const void *_virtual_screen);
  58. void    ScreenUpdateLine(const void *_virtual_screen_line, int _row);
  59. void    ScreenRetrieve(void *_virtual_screen);
  60. void    ScreenVisualBell(void);
  61.  
  62. #endif /* !_POSIX_SOURCE */
  63. #endif /* !__STRICT_ANSI__ */
  64. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  65.  
  66. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  67.  
  68. #include <inlines/pc.h>
  69.  
  70. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  71.  
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75.  
  76. #endif /* !__dj_include_pc_h_ */
  77.